<template>
    <div  class="app-container" v-loading="loading">
        <div class="assets-view-tit-nav bg-white pdr pdl">
            <el-tabs v-model="activeName" @tab-click="handleClick">
                <el-tab-pane label="标准概览" name="first"></el-tab-pane>
                <el-tab-pane label="内容概览" name="second"></el-tab-pane>
            </el-tabs>
        </div>
        <template v-if="activeName ==='first'">
           <!-- <Standard/> -->
           <DataOverViewStandardView />
        </template>
        <template v-if="activeName === 'second'">
            <div class="mt10">
                <content-view />
            </div>
        </template>
    </div>
</template>
<script>
// import Standard from './model/standard'
import contentView from './model/contentView'
import DataOverViewStandardView from "@/views/dataManagement/modules/DataOverViewStandardView";
export default {
    name:"assetsView",
    components:{
        DataOverViewStandardView,
        // Standard,
        contentView
    },
    data(){
        return{
            loading:false,
            activeName:'first',
            list:[
                {
                    data:'2021',
                    list:[
                        {
                            logType:0,
                            size:12
                        },
                        {
                            logType:1,
                            size:11
                        },
                        {
                            logType:2,
                            size:12
                        },
                        {
                            logType:3,
                            size:13
                        }
                    ]
                },
                 {
                    data:'2021',
                    list:[
                        {
                            logType:0,
                            size:22
                        },
                        {
                            logType:1,
                            size:21
                        },
                        {
                            logType:2,
                            size:22
                        },
                        {
                            logType:3,
                            size:23
                        }
                    ]
                },
                 {
                    data:'2021',
                    list:[
                        {
                            logType:0,
                            size:32
                        },
                        {
                            logType:1,
                            size:31
                        },
                        {
                            logType:2,
                            size:32
                        },
                        {
                            logType:3,
                            size:33
                        }
                    ]
                }
            ],
        }
    },
    mounted(){
    },
    methods:{
        setDatas(){
            var size0 = [],size1 = [],size2 = [],size3 = [],dataTime=[];
            function setCharDatas(data){
                var j=1;j++
                for(var i=0;i<data.length;i++){
                    if(Array.isArray(data[i].list)) {
                        dataTime.push(data[i].data)
                        setCharDatas(data[i].list)
                    } else {
                        if(data[i].logType == 0) {
                            size0.push(data[i].size)
                        } else if(data[i].logType == 1){
                            size1.push(data[i].size)
                        } else if(data[i].logType == 2){
                            size2.push(data[i].size)
                        } else {
                            size3.push(data[i].size)
                        }
                    }
                }
                return {size0,size1,size2,size3,dataTime};
            }
            console.log(setCharDatas(this.list))
        },
        handleClick(tab, event) {
            // this.activeName = tab
        }
    }
}
</script>
<style  scoped lang="scss">
.pdr{
    padding-right:20px;
}
.pdl{
    padding-left:20px;
}

.app-container{
    background: #F4F4F4;
    padding:0;
}
.assets-view-tit-nav ::v-deep .el-tabs__header{
    margin-bottom:0px;
}
</style>>
